Api.GetSlaveById method

Gets detailed information from a specified slave using an ID.

Namespace: IntervalZero.KINGSTAR.Local.Api

Assembly: IntervalZero.KINGSTAR.Local.Api (in IntervalZero.KINGSTAR.Local.dll) Version: 4.4.0.0

Syntax

C#VB
public KsReturn<SlaveStatus> GetSlaveById(
       int Index
)
Public Function GetSlaveById(
       Index As Integer
) As KsReturn(Of SlaveStatus)

Parameters

Index

Type: int

The index of a slave array. When EtherCAT is started, this index has the same value as the SlaveId, which corresponds to the position of the slave in the network. Please note that after EtherCAT is started in the Operational (Op) state, any addition or removal of slaves from the network will change the position of the slaves in the network (SlaveId). Nevertheless, the index of the slave will remain the same. Newly added devices will be added in the back of the slave array. For all slaves after the change, the index and SlaveId will no longer match. This behavior is only available for physical devices; simulated devices are inapplicable. This behavior is only available for physical devices; simulated devices are inapplicable. Please refer to the use cases in EnableHotConnect for more details.

Return value

Type: KsReturn<SlaveStatus>

Returns a KsError code and a SlaveStatus value.

Remarks

Retrieves details about a specified slave using the slave’s position in the EtherCAT loop. Since it uses the slave ID, it doesn't use the alias information. It works only for real slave modules without separating axes or I/Os. Use after the KINGSTAR Subsystem starts.

Usable EtherCAT states

ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP

Examples

C#
N/A

See also

Api Class

IntervalZero.KINGSTAR.Local.Api Namespace